
#pragma once

#include "IGUIElement.h"
#include "irrTypes.h"
#include "SColor.h"

class CCinematicThread;

namespace irr
{
namespace gui
{
	const u32 EGUIET_CINEMATICCTRL = 0x45464748;	// TREE in Hex

	class IGUIFont;	

	//! Default list box GUI element.
	class IGUICinematicCtrl : public IGUIElement
	{	
		friend IGUICinematicCtrl *AddGUICinematicCtrl( IGUIEnvironment *env, const core::rect<s32> Rectangle, IGUIElement *parent, s32 );
		public:

			//! destructor
			~IGUICinematicCtrl() {};
		
			virtual bool SetOverrideFont(IGUIFont *font) = 0;
			virtual IGUIFont *GetOverrideFont() = 0;

			virtual void draw() = 0;
			
			virtual inline gui::EGUI_ELEMENT_TYPE getType() {return (EGUI_ELEMENT_TYPE)EGUIET_CINEMATICCTRL;};
			
			bool OnEvent(const SEvent& event) = 0;						
			
			virtual int AddThread(CCinematicThread* t)  = 0;
			virtual void RemoveThread(s32 index)  = 0;			
			
			virtual void* GetSelectedData() = 0;
			virtual const wchar_t* GetSelectedText() = 0;

			virtual void SetSelectedText(const wchar_t* text) = 0;

			virtual void SetSelectedData( void*) = 0;
			virtual void SetSelectedColor(irr::video::SColor color , irr::core::stringw text , s32 columns = 1) = 0;
			
			virtual s32 GetSelectedRow() = 0;
			virtual s32 GetSelectedColumn() = 0;
			virtual s32 GetTableRows() = 0;
			virtual s32 GetTableColumns() = 0;
			virtual const wchar_t* GetTableText(s32 , s32) = 0;
			virtual void* GetTableData(s32 , s32) = 0;
			virtual void SetTableData(s32 , s32 , void*) = 0;
			virtual void SetTableColor(s32 r , s32 c ,irr::video::SColor color , irr::core::stringw text , s32 columns = 1) = 0;
		protected:
			//! constructor
			IGUICinematicCtrl(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
			: IGUIElement((EGUI_ELEMENT_TYPE)EGUIET_CINEMATICCTRL, environment, parent, id, rectangle) {}
	};
	
	IGUICinematicCtrl *AddIGUICinematicCtrl( IGUIEnvironment *env, const core::rect<s32> Rectangle, IGUIElement *parent = NULL, s32 id = -1); 

} // end namespace gui
} // end namespace irr
